<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no"/>
    <meta charset="utf-8">
    <title>Spread Operator</title>
    <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
<h1>Spread Operator</h1>
<p>Open the console</p>
<script type="text/babel">

    // Spread operator works with objects too

    var morning = {
      breakfast: "oatmeal",
      lunch: "peanut butter and jelly"
    }

    var dinner = "mac and cheese"

    var backpackingMeals = {
      ...morning,
      dinner
    }

    console.log(backpackingMeals)

</script>
</body>
</html>
